#ifndef _PLAYER_H_
#define _PLAYER_H_

/**
 * \file     player.h
 * \brief    player 
 * \author   fatma.jaafar@esprit.tn
 * \version  0.5
 * \date     first release 
 *
 * This file describe public animation structure and functions.
 *
 * ----------------------------------------
 * Copyright (C) 2014 FATMA JAAFAR
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

/**
 * \defgroup GAME GAME
 * \{ */

/**
 * \defgroup PLAYER PLAYER
 * \{ */


/* =================================80======================================= */
/*                               INCLUDES                                     */
/* =================================80======================================= */
#include "structures.h"


 /* =================================80======================================= */
/*                           STRUCTURE GLOBAL                                 */
/* =================================80======================================= */

/**
 * \brief definie une variable globale de gestion du jeu.
 */
 Gestion jeu;  
 /**
 * \brief definie une variable globale de gestion de l'input.
 */

Input input;
/**
 * \brief definie une variable globale de gestion du background.
 */
 Map map;

 /**
 * \brief definie une variable globale de gestion du hero.
 */
GameObject player;
/**
 * \brief definie une variable globale de gestion des entites.
 */

 GameObject *entity;
 /**
 * \brief definie une variable globale de gestion des shurikens.
 */
 GameObject shuriken[10];

  

/* =================================80======================================= */
/*                               FUNCTIONS                                    */
/* =================================80======================================= */

/**
 *
 * \brief   charger une image dans une surface SDL.
 *
 * \param   char* name                        : nom de la surface.
 * \return  SDL_Surface 
 * \author  \@gmail.com
 * \date    
 */

SDL_Surface *loadImage(char *name);
/**
 *
 * \brief   gerer le centrescrolling du Hero.
 *
 * \param   void
 * \return  void  
 * \author  fatma.jaaar@esprit.tn
 * \date    
 */
void centerScrollingOnPlayer(void);

/**
 *
 * \brief   collison des personnages avec le background.
 *
 * \param   GameObject *entity                     :nom du Gameobject
 * \return  void  
 * \author  fatma.jaaar@esprit.tn
 * \date    
 */
 void mapCollision(GameObject *entity);
 /**
 *
 * \brief   charger le background.
 *
 * \param   char *name                            :nom de la surface
 * \return  void  
 * \author  fatma.jaaar@esprit.tn
 * \date    
 */
void loadMap(char *name);
 /**
 *
 * \brief   gestion des animation.
 *
 * \param   GameObject *entity                     :nom du Gameobject
            char *name                             :nom de la surface
 * \return  void  
 * \author  fatma.jaaar@esprit.tn
 * \date    
 */
void changeAnimation(GameObject *entity, char *name);
/**
 *
 * \brief   jouer le son.
 *
 * \param   int type                              :numero du son
            
 * \return  void  
 * \author  fatma.jaaar@esprit.tn
 * \date    
 */

void playSoundFx(int type);
/**
 *
 * \brief   créer les shurikens.
 *
 * \param   void
            
 * \return  void  
 * \author  fatma.jaaar@esprit.tn
 * \date    
 */
void createFireBall(void);
// PLAYER
/** \} */
// GAME
/** \} */

#endif /* _PLAYER_H_ */
